package com.springinaction.springidol2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {

	@SuppressWarnings("resource")
	public static void main(String[] args) throws PerformanceException2 {
		System.out.println("Hello,World!");
		ApplicationContext ctx = new ClassPathXmlApplicationContext("spring/spring-idol2.xml");
		Instrument2 in = (Instrument2)ctx.getBean("guitar2");
		Performer2 p = (Performer2)ctx.getBean("instrumentalist2");
		in.play();
		p.perform();
	}
}
